Optimal. Leaf size=1129 \[ \frac {2 (2 c d-b e) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {e x^n}{d}\right ) e^4}{d \left (c d^2-b e d+a e^2\right )^3}+\frac {x \, _2F_1\left (2,\frac {1}{n};1+\frac {1}{n};-\frac {e x^n}{d}\right ) e^4}{d^2 \left (c d^2-b e d+a e^2\right )^2}-\frac {2 c \left (3 c^2 d^2+b \left (b+\sqrt {b^2-4 a c}\right ) e^2-c e \left (3 b d+2 \sqrt {b^2-4 a c} d+a e\right )\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right ) e^2}{\left (b^2-\sqrt {b^2-4 a c} b-4 a c\right ) \left (c d^2-b e d+a e^2\right )^3}-\frac {2 c \left (3 c^2 d^2+b \left (b-\sqrt {b^2-4 a c}\right ) e^2-c e \left (3 b d-2 \sqrt {b^2-4 a c} d+a e\right )\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right ) e^2}{\left (b^2+\sqrt {b^2-4 a c} b-4 a c\right ) \left (c d^2-b e d+a e^2\right )^3}+\frac {c \left (e^2 (1-n) b^4-e \left (2 c d-\sqrt {b^2-4 a c} e\right ) (1-n) b^3-c \left (e \left (a e (5-7 n)+2 \sqrt {b^2-4 a c} d (1-n)\right )-c d^2 (1-n)\right ) b^2+c \left (c d \left (4 a e (2-3 n)+\sqrt {b^2-4 a c} d (1-n)\right )-3 a \sqrt {b^2-4 a c} e^2 (1-n)\right ) b+4 a c^2 \left (e \left (a e (1-2 n)+\sqrt {b^2-4 a c} d (1-n)\right )-c d^2 (1-2 n)\right )\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{a \left (b^2-4 a c\right ) \left (b^2-\sqrt {b^2-4 a c} b-4 a c\right ) \left (c d^2-b e d+a e^2\right )^2 n}+\frac {c \left (e^2 (1-n) b^4-e \left (2 c d+\sqrt {b^2-4 a c} e\right ) (1-n) b^3-c \left (e \left (a e (5-7 n)-2 \sqrt {b^2-4 a c} d (1-n)\right )-c d^2 (1-n)\right ) b^2+c \left (3 a \sqrt {b^2-4 a c} (1-n) e^2+c d \left (4 a e (2-3 n)-\sqrt {b^2-4 a c} d (1-n)\right )\right ) b+4 a c^2 \left (e \left (a e (1-2 n)-\sqrt {b^2-4 a c} d (1-n)\right )-c d^2 (1-2 n)\right )\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{a \left (b^2-4 a c\right ) \left (b^2+\sqrt {b^2-4 a c} b-4 a c\right ) \left (c d^2-b e d+a e^2\right )^2 n}-\frac {x \left (c \left (-e^2 b^3+2 c d e b^2-c \left (c d^2-3 a e^2\right ) b-4 a c^2 d e\right ) x^n-b^4 e^2-6 a b c^2 d e+2 b^3 c d e-b^2 c \left (c d^2-4 a e^2\right )+2 a c^2 \left (c d^2-a e^2\right )\right )}{a \left (b^2-4 a c\right ) \left (c d^2-b e d+a e^2\right )^2 n \left (b x^n+c x^{2 n}+a\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 3.34, antiderivative size = 1129, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {1436, 245, 1430, 1422} \[ \frac {2 (2 c d-b e) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {e x^n}{d}\right ) e^4}{d \left (c d^2-b e d+a e^2\right )^3}+\frac {x \, _2F_1\left (2,\frac {1}{n};1+\frac {1}{n};-\frac {e x^n}{d}\right ) e^4}{d^2 \left (c d^2-b e d+a e^2\right )^2}-\frac {2 c \left (3 c^2 d^2+b \left (b+\sqrt {b^2-4 a c}\right ) e^2-c e \left (3 b d+2 \sqrt {b^2-4 a c} d+a e\right )\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right ) e^2}{\left (b^2-\sqrt {b^2-4 a c} b-4 a c\right ) \left (c d^2-b e d+a e^2\right )^3}-\frac {2 c \left (3 c^2 d^2+b \left (b-\sqrt {b^2-4 a c}\right ) e^2-c e \left (3 b d-2 \sqrt {b^2-4 a c} d+a e\right )\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right ) e^2}{\left (b^2+\sqrt {b^2-4 a c} b-4 a c\right ) \left (c d^2-b e d+a e^2\right )^3}+\frac {c \left (e^2 (1-n) b^4-e \left (2 c d-\sqrt {b^2-4 a c} e\right ) (1-n) b^3-c \left (e \left (a e (5-7 n)+2 \sqrt {b^2-4 a c} d (1-n)\right )-c d^2 (1-n)\right ) b^2+c \left (c d \left (4 a e (2-3 n)+\sqrt {b^2-4 a c} d (1-n)\right )-3 a \sqrt {b^2-4 a c} e^2 (1-n)\right ) b+4 a c^2 \left (e \left (a e (1-2 n)+\sqrt {b^2-4 a c} d (1-n)\right )-c d^2 (1-2 n)\right )\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{a \left (b^2-4 a c\right ) \left (b^2-\sqrt {b^2-4 a c} b-4 a c\right ) \left (c d^2-b e d+a e^2\right )^2 n}+\frac {c \left (e^2 (1-n) b^4-e \left (2 c d+\sqrt {b^2-4 a c} e\right ) (1-n) b^3-c \left (e \left (a e (5-7 n)-2 \sqrt {b^2-4 a c} d (1-n)\right )-c d^2 (1-n)\right ) b^2+c \left (3 a \sqrt {b^2-4 a c} (1-n) e^2+c d \left (4 a e (2-3 n)-\sqrt {b^2-4 a c} d (1-n)\right )\right ) b+4 a c^2 \left (e \left (a e (1-2 n)-\sqrt {b^2-4 a c} d (1-n)\right )-c d^2 (1-2 n)\right )\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{a \left (b^2-4 a c\right ) \left (b^2+\sqrt {b^2-4 a c} b-4 a c\right ) \left (c d^2-b e d+a e^2\right )^2 n}-\frac {x \left (c \left (-e^2 b^3+2 c d e b^2-c \left (c d^2-3 a e^2\right ) b-4 a c^2 d e\right ) x^n-b^4 e^2-6 a b c^2 d e+2 b^3 c d e-b^2 c \left (c d^2-4 a e^2\right )+2 a c^2 \left (c d^2-a e^2\right )\right )}{a \left (b^2-4 a c\right ) \left (c d^2-b e d+a e^2\right )^2 n \left (b x^n+c x^{2 n}+a\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 245
Rule 1422
Rule 1430
Rule 1436
Rubi steps
\begin {align*} \int \frac {1}{\left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )^2} \, dx &=\int \left (\frac {e^4}{\left (c d^2-b d e+a e^2\right )^2 \left (d+e x^n\right )^2}-\frac {2 e^4 (-2 c d+b e)}{\left (c d^2-b d e+a e^2\right )^3 \left (d+e x^n\right )}+\frac {c^2 d^2-2 b c d e+b^2 e^2-a c e^2-\left (2 c^2 d e-b c e^2\right ) x^n}{\left (c d^2-b d e+a e^2\right )^2 \left (a+b x^n+c x^{2 n}\right )^2}+\frac {e^2 \left (3 c^2 d^2-5 b c d e+2 b^2 e^2-a c e^2+\left (-4 c^2 d e+2 b c e^2\right ) x^n\right )}{\left (c d^2-b d e+a e^2\right )^3 \left (a+b x^n+c x^{2 n}\right )}\right ) \, dx\\ &=\frac {e^2 \int \frac {3 c^2 d^2-5 b c d e+2 b^2 e^2-a c e^2+\left (-4 c^2 d e+2 b c e^2\right ) x^n}{a+b x^n+c x^{2 n}} \, dx}{\left (c d^2-b d e+a e^2\right )^3}+\frac {\left (2 e^4 (2 c d-b e)\right ) \int \frac {1}{d+e x^n} \, dx}{\left (c d^2-b d e+a e^2\right )^3}+\frac {\int \frac {c^2 d^2-2 b c d e+b^2 e^2-a c e^2-\left (2 c^2 d e-b c e^2\right ) x^n}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx}{\left (c d^2-b d e+a e^2\right )^2}+\frac {e^4 \int \frac {1}{\left (d+e x^n\right )^2} \, dx}{\left (c d^2-b d e+a e^2\right )^2}\\ &=-\frac {x \left (2 b^3 c d e-6 a b c^2 d e-b^4 e^2-b^2 c \left (c d^2-4 a e^2\right )+2 a c^2 \left (c d^2-a e^2\right )+c \left (2 b^2 c d e-4 a c^2 d e-b^3 e^2-b c \left (c d^2-3 a e^2\right )\right ) x^n\right )}{a \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right )^2 n \left (a+b x^n+c x^{2 n}\right )}+\frac {2 e^4 (2 c d-b e) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {e x^n}{d}\right )}{d \left (c d^2-b d e+a e^2\right )^3}+\frac {e^4 x \, _2F_1\left (2,\frac {1}{n};1+\frac {1}{n};-\frac {e x^n}{d}\right )}{d^2 \left (c d^2-b d e+a e^2\right )^2}-\frac {\left (c e^2 \left (3 c^2 d^2+b \left (b-\sqrt {b^2-4 a c}\right ) e^2-c e \left (3 b d-2 \sqrt {b^2-4 a c} d+a e\right )\right )\right ) \int \frac {1}{\frac {b}{2}+\frac {1}{2} \sqrt {b^2-4 a c}+c x^n} \, dx}{\sqrt {b^2-4 a c} \left (c d^2-b d e+a e^2\right )^3}+\frac {\left (c e^2 \left (3 c^2 d^2+b \left (b+\sqrt {b^2-4 a c}\right ) e^2-c e \left (3 b d+2 \sqrt {b^2-4 a c} d+a e\right )\right )\right ) \int \frac {1}{\frac {b}{2}-\frac {1}{2} \sqrt {b^2-4 a c}+c x^n} \, dx}{\sqrt {b^2-4 a c} \left (c d^2-b d e+a e^2\right )^3}-\frac {\int \frac {-b^2 c \left (a e^2 (4-5 n)-c d^2 (1-n)\right )+2 a b c^2 d e (3-4 n)-2 a c^2 \left (c d^2-a e^2\right ) (1-2 n)-2 b^3 c d e (1-n)+b^4 e^2 (1-n)-c \left (2 b^2 c d e-4 a c^2 d e-b^3 e^2-b c \left (c d^2-3 a e^2\right )\right ) (1-n) x^n}{a+b x^n+c x^{2 n}} \, dx}{a \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right )^2 n}\\ &=-\frac {x \left (2 b^3 c d e-6 a b c^2 d e-b^4 e^2-b^2 c \left (c d^2-4 a e^2\right )+2 a c^2 \left (c d^2-a e^2\right )+c \left (2 b^2 c d e-4 a c^2 d e-b^3 e^2-b c \left (c d^2-3 a e^2\right )\right ) x^n\right )}{a \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right )^2 n \left (a+b x^n+c x^{2 n}\right )}+\frac {2 c e^2 \left (3 c^2 d^2+b \left (b+\sqrt {b^2-4 a c}\right ) e^2-c e \left (3 b d+2 \sqrt {b^2-4 a c} d+a e\right )\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{\sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right ) \left (c d^2-b d e+a e^2\right )^3}-\frac {2 c e^2 \left (3 c^2 d^2+b \left (b-\sqrt {b^2-4 a c}\right ) e^2-c e \left (3 b d-2 \sqrt {b^2-4 a c} d+a e\right )\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{\sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right ) \left (c d^2-b d e+a e^2\right )^3}+\frac {2 e^4 (2 c d-b e) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {e x^n}{d}\right )}{d \left (c d^2-b d e+a e^2\right )^3}+\frac {e^4 x \, _2F_1\left (2,\frac {1}{n};1+\frac {1}{n};-\frac {e x^n}{d}\right )}{d^2 \left (c d^2-b d e+a e^2\right )^2}-\frac {\left (c \left (4 a c^2 \left (e \left (a e (1-2 n)+\sqrt {b^2-4 a c} d (1-n)\right )-c d^2 (1-2 n)\right )-b^2 c \left (e \left (a e (5-7 n)+2 \sqrt {b^2-4 a c} d (1-n)\right )-c d^2 (1-n)\right )+b c \left (c d \left (4 a e (2-3 n)+\sqrt {b^2-4 a c} d (1-n)\right )-3 a \sqrt {b^2-4 a c} e^2 (1-n)\right )+b^4 e^2 (1-n)-b^3 e \left (2 c d-\sqrt {b^2-4 a c} e\right ) (1-n)\right )\right ) \int \frac {1}{\frac {b}{2}-\frac {1}{2} \sqrt {b^2-4 a c}+c x^n} \, dx}{2 a \left (b^2-4 a c\right )^{3/2} \left (c d^2-b d e+a e^2\right )^2 n}+\frac {\left (c \left (4 a c^2 \left (e \left (a e (1-2 n)-\sqrt {b^2-4 a c} d (1-n)\right )-c d^2 (1-2 n)\right )-b^2 c \left (e \left (a e (5-7 n)-2 \sqrt {b^2-4 a c} d (1-n)\right )-c d^2 (1-n)\right )+b c \left (c d \left (4 a e (2-3 n)-\sqrt {b^2-4 a c} d (1-n)\right )+3 a \sqrt {b^2-4 a c} e^2 (1-n)\right )+b^4 e^2 (1-n)-b^3 e \left (2 c d+\sqrt {b^2-4 a c} e\right ) (1-n)\right )\right ) \int \frac {1}{\frac {b}{2}+\frac {1}{2} \sqrt {b^2-4 a c}+c x^n} \, dx}{2 a \left (b^2-4 a c\right )^{3/2} \left (c d^2-b d e+a e^2\right )^2 n}\\ &=-\frac {x \left (2 b^3 c d e-6 a b c^2 d e-b^4 e^2-b^2 c \left (c d^2-4 a e^2\right )+2 a c^2 \left (c d^2-a e^2\right )+c \left (2 b^2 c d e-4 a c^2 d e-b^3 e^2-b c \left (c d^2-3 a e^2\right )\right ) x^n\right )}{a \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right )^2 n \left (a+b x^n+c x^{2 n}\right )}+\frac {2 c e^2 \left (3 c^2 d^2+b \left (b+\sqrt {b^2-4 a c}\right ) e^2-c e \left (3 b d+2 \sqrt {b^2-4 a c} d+a e\right )\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{\sqrt {b^2-4 a c} \left (b-\sqrt {b^2-4 a c}\right ) \left (c d^2-b d e+a e^2\right )^3}-\frac {c \left (4 a c^2 \left (e \left (a e (1-2 n)+\sqrt {b^2-4 a c} d (1-n)\right )-c d^2 (1-2 n)\right )-b^2 c \left (e \left (a e (5-7 n)+2 \sqrt {b^2-4 a c} d (1-n)\right )-c d^2 (1-n)\right )+b c \left (c d \left (4 a e (2-3 n)+\sqrt {b^2-4 a c} d (1-n)\right )-3 a \sqrt {b^2-4 a c} e^2 (1-n)\right )+b^4 e^2 (1-n)-b^3 e \left (2 c d-\sqrt {b^2-4 a c} e\right ) (1-n)\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{a \left (b^2-4 a c\right )^{3/2} \left (b-\sqrt {b^2-4 a c}\right ) \left (c d^2-b d e+a e^2\right )^2 n}-\frac {2 c e^2 \left (3 c^2 d^2+b \left (b-\sqrt {b^2-4 a c}\right ) e^2-c e \left (3 b d-2 \sqrt {b^2-4 a c} d+a e\right )\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{\sqrt {b^2-4 a c} \left (b+\sqrt {b^2-4 a c}\right ) \left (c d^2-b d e+a e^2\right )^3}+\frac {c \left (4 a c^2 \left (e \left (a e (1-2 n)-\sqrt {b^2-4 a c} d (1-n)\right )-c d^2 (1-2 n)\right )-b^2 c \left (e \left (a e (5-7 n)-2 \sqrt {b^2-4 a c} d (1-n)\right )-c d^2 (1-n)\right )+b c \left (c d \left (4 a e (2-3 n)-\sqrt {b^2-4 a c} d (1-n)\right )+3 a \sqrt {b^2-4 a c} e^2 (1-n)\right )+b^4 e^2 (1-n)-b^3 e \left (2 c d+\sqrt {b^2-4 a c} e\right ) (1-n)\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{a \left (b^2-4 a c\right )^{3/2} \left (b+\sqrt {b^2-4 a c}\right ) \left (c d^2-b d e+a e^2\right )^2 n}+\frac {2 e^4 (2 c d-b e) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {e x^n}{d}\right )}{d \left (c d^2-b d e+a e^2\right )^3}+\frac {e^4 x \, _2F_1\left (2,\frac {1}{n};1+\frac {1}{n};-\frac {e x^n}{d}\right )}{d^2 \left (c d^2-b d e+a e^2\right )^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 8.02, size = 16855, normalized size = 14.93 \[ \text {Result too large to show} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 6.75, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {1}{b^{2} e^{2} x^{4 \, n} + a^{2} d^{2} + {\left (c^{2} e^{2} x^{2 \, n} + 2 \, c^{2} d e x^{n} + c^{2} d^{2}\right )} x^{4 \, n} + 2 \, {\left (b^{2} d e + a b e^{2}\right )} x^{3 \, n} + 2 \, {\left (b c e^{2} x^{3 \, n} + a c d^{2} + {\left (2 \, b c d e + a c e^{2}\right )} x^{2 \, n} + {\left (b c d^{2} + 2 \, a c d e\right )} x^{n}\right )} x^{2 \, n} + {\left (b^{2} d^{2} + 4 \, a b d e + a^{2} e^{2}\right )} x^{2 \, n} + 2 \, {\left (a b d^{2} + a^{2} d e\right )} x^{n}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{{\left (c x^{2 \, n} + b x^{n} + a\right )}^{2} {\left (e x^{n} + d\right )}^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.26, size = 0, normalized size = 0.00 \[ \int \frac {1}{\left (e \,x^{n}+d \right )^{2} \left (b \,x^{n}+c \,x^{2 n}+a \right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {1}{{\left (d+e\,x^n\right )}^2\,{\left (a+b\,x^n+c\,x^{2\,n}\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________